﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Authority
{
    /// <summary>
    /// 包含功能特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
    public class IncludeAttribute : Attribute
    {
        /// <summary>
        /// 包含的功能
        /// </summary>
        public ActionEnum Action { get; set; }

        /// <summary>
        /// 排序索引
        /// </summary>
        public int Index { get; set; }

        /// <summary>
        /// 包含功能特性
        /// </summary>
        /// <param name="actions">包含的功能</param>
        /// <param name="index">排序索引</param>
        public IncludeAttribute(ActionEnum action, int index)
        {
            this.Action = action;
            this.Index = index;
        }
    }
}
